package org.bt.common.validator.aspect;

import org.bt.common.constant.CommonConstant;
import org.bt.common.validator.MobileValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * IsMobile
 * <p>
 * Created on 2020/1/8
 *
 * @author tongw
 */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {MobileValidator.class})
public @interface Mobile {

    String message() default CommonConstant.Valid.MOBILE;

    String name() default "手机号";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
